Equivalence of Program Dependence Graphs in Refactoring

نویسنده

  • Lukas Felber
چکیده

Program dependence graphs are widely used in computer science for example when performing optimizations, parallelization and as an internal program representation in integrated development environments. In this paper, I will look into the usefulness of program dependence graphs regarding refactoring. Refactoring is a very useful technique to improve the internal structure of a program. Many modern integrated development environments provide automated refactoring support because the process of refactoring, when done by hand is time-consuming an error-prone. This article summarizes three papers which are then used as a basis to develop ideas on the usefulness of program dependence graphs in automated refactoring. These papers all define equivalence theorems for a range of languages which, for some programs, with the use of program dependence graphs, can show that the programs are strongly equivalent when considering a given initial and a resulting final state. This means that two programs can represent the same program behavior even if they are not exactly the same. Since this is often the case for program code before and after refactoring, I examine in this article weather the ideas behind those theorems could be useful in the process of automated refactoring. It is discussed whether an extension of those equivalence theorems would be possible and necessary, to make them feasible for automated refactorings by guaranteeing that an automatically applied refactoring indeed preserve the functionality of the program.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Detecting Refactorable Clones by Slicing Program Dependence Graphs

Code duplication in a program can make understanding and maintenance difficult. The problem can be reduced by detecting duplicated code, refactoring it into a separate procedure, and replacing all the clones by appropriate calls to the new procedure. In this paper, we report on a confirmatory replication of a tool that was used to detect such refactorable clones based on program dependence grap...

متن کامل

The Multi-Procedure Equivalence Theorem

This paper concerns the question of whether program dependence graphs are “adequate” as a program representation. Previous results on the adequacy of program dependence graphs have been limited to a language without procedures and procedure calls. Our main result is a theorem that extends previous results to a language with procedures and procedure calls. The theorem shows that if the program d...

متن کامل

Semantical Equivalence of the Control Flow Graph and the Program Dependence Graph

The program dependence graph (PDG) represents data and control dependence between statements in a program. This paper presents an operational semantics of program dependence graphs. Since PDGs exclude artificial order of statements that resides in sequential programs, executions of PDGs are not unique. However, we identified a class of PDGs that have unique final states of executions, called de...

متن کامل

The graph of equivalence classes and Isoclinism of groups

‎Let $G$ be a non-abelian group and let $Gamma(G)$ be the non-commuting graph of $G$‎. ‎In this paper we define an equivalence relation $sim$ on the set of $V(Gamma(G))=Gsetminus Z(G)$ by taking $xsim y$ if and only if $N(x)=N(y)$‎, ‎where $ N(x)={uin G | x textrm{ and } u textrm{ are adjacent in }Gamma(G)}$ is the open neighborhood of $x$ in $Gamma(G)$‎. ‎We introduce a new graph determined ...

متن کامل

A Model-driven Approach to Program Refactoring

Refactoring object-oriented programs along with their associated models usually involve complex maintenance efforts, in order to keep those artifacts correct and up to date. Most projects abandon design information in the form of models early in the life cycle, as their sustentation turns out extremely expensive. In this paper, we propose an approach for refactoring object-oriented programs by ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008